home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / FunctionWindow.h < prev    next >
Text File  |  1994-05-28  |  4KB  |  111 lines

  1. /* FunctionWindow.h */
  2.  
  3. #ifndef Included_FunctionWindow_h
  4. #define Included_FunctionWindow_h
  5.  
  6. /* FunctionWindow module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Screen */
  12. /* EventLoop */
  13. /* Menus */
  14. /* MainWindowStuff */
  15. /* FunctionObject */
  16. /* TextEdit */
  17. /* WindowDispatcher */
  18. /* Memory */
  19. /* GrowIcon */
  20. /* DataMunging */
  21. /* Main */
  22. /* DisassemblyWindow */
  23. /* Alert */
  24. /* FunctionList */
  25. /* FindDialog */
  26. /* GlobalWindowMenuList */
  27.  
  28. #include "Screen.h"
  29. #include "EventLoop.h"
  30. #include "Menus.h"
  31.  
  32. struct FunctionWindowRec;
  33. typedef struct FunctionWindowRec FunctionWindowRec;
  34.  
  35. /* forward declarations */
  36. struct MainWindowRec;
  37. struct FunctionObjectRec;
  38. struct FunctionListRec;
  39.  
  40. /* create a new function editing window */
  41. FunctionWindowRec*    NewFunctionWindow(struct MainWindowRec* MainWindow,
  42.                                             struct FunctionObjectRec* FunctionObject,
  43.                                             struct FunctionListRec* FunctionList, OrdType WinX, OrdType WinY,
  44.                                             OrdType WinWidth, OrdType WinHeight);
  45.  
  46. /* dispose of the function editing window */
  47. void                                DisposeFunctionWindow(FunctionWindowRec* Window);
  48.  
  49. /* dispatch callback for handling idle events */
  50. void                                FunctionWindowDoIdle(FunctionWindowRec* Window,
  51.                                             MyBoolean CheckCursorFlag, OrdType XLoc, OrdType YLoc,
  52.                                             ModifierFlags Modifiers);
  53.  
  54. /* dispatch callback that's called when our window comes to the top */
  55. void                                FunctionWindowBecomeActive(FunctionWindowRec* Window);
  56.  
  57. /* dispatch callback that's called when our window is no longer on top */
  58. void                                FunctionWindowBecomeInactive(FunctionWindowRec* Window);
  59.  
  60. /* dispatch callback to handle window resized event (change sizes of things */
  61. /* that the window contains) */
  62. void                                FunctionWindowJustResized(FunctionWindowRec* Window);
  63.  
  64. /* dispatch callback to handle mouse down events */
  65. void                                FunctionWindowDoMouseDown(OrdType XLoc, OrdType YLoc,
  66.                                             ModifierFlags Modifiers, FunctionWindowRec* Window);
  67.  
  68. /* dispatch callback to handle key down events */
  69. void                                FunctionWindowDoKeyDown(unsigned char KeyCode,
  70.                                             ModifierFlags Modifiers, FunctionWindowRec* Window);
  71.  
  72. /* dispatch callback to handle click in the close box */
  73. void                                FunctionWindowClose(FunctionWindowRec* Window);
  74.  
  75. /* screen callback for redrawing window */
  76. void                                FunctionWindowUpdator(FunctionWindowRec* Window);
  77.  
  78. /* menu callback for enabling menu items */
  79. void                                FunctionWindowMenuSetup(FunctionWindowRec* Window);
  80.  
  81. /* dispatch callback for executing a menu item the user has chosen */
  82. void                                FunctionWindowDoMenuCommand(FunctionWindowRec* Window,
  83.                                             MenuItemType* MenuItem);
  84.  
  85. /* utility routine to hilite a text line on which a compile error has occurred */
  86. void                                FunctionWindowHiliteLine(FunctionWindowRec* Window, long ErrorLine);
  87.  
  88. /* utility routine to bring this window to the top. */
  89. void                                FunctionWindowBringToTop(FunctionWindowRec* Window);
  90.  
  91. /* check to see if data in text edit boxes has been altered */
  92. MyBoolean                        HasFunctionWindowBeenModified(FunctionWindowRec* Window);
  93.  
  94. /* get a copy of the name edit */
  95. char*                                FunctionWindowGetNameCopy(FunctionWindowRec* Window);
  96.  
  97. /* get a copy of the source text edit */
  98. char*                                FunctionWindowGetSourceCopy(FunctionWindowRec* Window);
  99.  
  100. /* the name of the document has changed, so change the name of the window */
  101. void                                FunctionWindowGlobalNameChange(FunctionWindowRec* Window,
  102.                                             char* NewFilename);
  103.  
  104. /* refresh the titlebar of the window */
  105. void                                FunctionWindowResetTitlebar(FunctionWindowRec* Window);
  106.  
  107. /* force the function window to write back to the object any data that has changed */
  108. MyBoolean                        FunctionWindowWritebackModifiedData(FunctionWindowRec* Window);
  109.  
  110. #endif
  111.